import axiosInstance from './axios'

export function getCode(){
    return axiosInstance({
        url:'/auth/code',
        method:'get'
    })
}

// 用户密码登录
export function login(requestUser:object){
    return axiosInstance({
      url: "/auth/login",
      method: "post",
      data: requestUser,
    });
}

// 通过token登录
export function loginByToken(token: any) {
  return axiosInstance({
    url: "/auth/loginByToken?token=" + token,
    method: "post",
  });
}